package de.schlinke_marius.database;

import android.database.Cursor;
import android.database.sqlite.SQLiteException;


public interface ExamplesTbl {
	
	public static final String TABLE_NAME = "EXAMPLES";
	
	public static final String COLUMN_ID = "_ID";
	
	public static final String COLUMN_NAME = "NAME";
	
	public static final String COLUMN_DATE = "DATE";
	
	public static final String COLUMN_PRICE = "PRICE";
	
	public static final String COLUMN_PICTUREURL = "PICTUREURL";
	
	public static final String COLUMN_DESCRIPTION = "DESCRIPTION";
	
	public static final String COLUMN_COMMENT = "COMMENT";
	
	public static final String COLUMN_HARDWARECOSTS = "HARDWARECOSTS";
	
	public static final String COLUMN_SOFTWARECOSTS = "SOFTWARECOSTS";
	
	public static final String COLUMN_CONSULTINGCOSTS = "CONSULTINGCOSTS";
	
	public static final String COLUMN_EXTRASCOSTS = "EXTRASCOSTS";
	
	public static final String COLUMN_BENCHMARK = "BENCHMARK";
	
	public static final String COLUMN_BENCHHMARK_CPU = "BENCHMARKCPU";
	
	public static final String COLUMN_BENCHMARK_GRAPHIC = "BENCHMARGRAPHIC";

	
	public static final String[] COLUMNS = { 
									COLUMN_ID,
									COLUMN_NAME,
									COLUMN_DATE,
									COLUMN_PRICE,
									COLUMN_PICTUREURL,
									COLUMN_DESCRIPTION,
									COLUMN_COMMENT,
									COLUMN_HARDWARECOSTS,
									COLUMN_SOFTWARECOSTS,
									COLUMN_CONSULTINGCOSTS,
									COLUMN_EXTRASCOSTS,
									COLUMN_BENCHMARK, 
									COLUMN_BENCHHMARK_CPU,
									COLUMN_BENCHMARK_GRAPHIC};	

	public static final String CREATE_TABLE_EXAMPLES  = " CREATE TABLE  IF NOT EXISTS " + TABLE_NAME+  " ( " 
			+ COLUMN_ID + " INTEGER PRIMARY KEY  AUTOINCREMENT  NOT NULL," 		
			+ COLUMN_NAME + " text, "
			+ COLUMN_DATE + " text, "
			+ COLUMN_PRICE + " text, "
			+ COLUMN_PICTUREURL  + " text, "
			+ COLUMN_DESCRIPTION + " text, " 
			+ COLUMN_COMMENT + " text, " 
		    + COLUMN_HARDWARECOSTS + " text, "
		    + COLUMN_SOFTWARECOSTS + " text, "
		    + COLUMN_CONSULTINGCOSTS + " text, " 
		    + COLUMN_EXTRASCOSTS + " text, " 
		    + COLUMN_BENCHMARK + " text, "
		    + COLUMN_BENCHHMARK_CPU + " text, "
		    + COLUMN_BENCHMARK_GRAPHIC + " text);";
	
	public static final String INSERT_INTO_EXAMPLES = "INSERT INTO " + TABLE_NAME + " ( " + COLUMN_ID + "," + COLUMN_NAME + "," + COLUMN_DATE + "," +  COLUMN_PRICE + "," +  COLUMN_PICTUREURL + "," +  COLUMN_DESCRIPTION + "," +  COLUMN_COMMENT + "," + COLUMN_HARDWARECOSTS + "," + COLUMN_SOFTWARECOSTS + "," + COLUMN_CONSULTINGCOSTS + "," + COLUMN_EXTRASCOSTS + "," + COLUMN_BENCHMARK + "," + COLUMN_BENCHHMARK_CPU + "," + COLUMN_BENCHMARK_GRAPHIC + ") values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)";

	public long insertIntoExamples(int id, String name, String date, String price, String pictureurl, String description, String comment, String hardwarecosts, String softwarecosts, String consultingcosts, String extrascosts, String benchmark, String benchmarkcpu, String benchmarkgraphic) throws SQLiteException;	
	
	public Cursor getExamples() throws SQLiteException; 
	
	public Cursor getExample(int id) throws SQLiteException;

}
